~4Dgifts/toolbox/hardware/h550_driver README Streams Driver for Comtrol Hostess 550 ISA Serial Port Board IRIX 5.2 ONLY Comtrol, Box 64750, St. Paul, MN, 55164, 612/631-7654 ================================================================= Included here is the source for an in-process project of writing a device driver for the Comtrol Hostess 550 Serial Port Board. The board can have either 4 our 8 ports per card. The UART chip used on the board is a 16550. Since this is a work in progress, not all of the functionality of the driver is working, or has been tested. As of this date, the following functions/routines are known to work: Routine Function ------- -------------------------------- edtinit Initializes the board and the ports found open Opens a port for use close Closes a port wput Writes data to the port (i.e. transmits) rsrv Read service - reads data from the port. poll The h550_poll routine does accept and properly identify interrupts. The read and write functions of the driver have only been tested on port 1. It is not known whether any of the other ports are functional. The ioctl routines have not been tested. Neither have the modem and flow modem controls and capabilities. This driver is included in the Toolbox as an example of an EISA and/or ISA driver. While there are differences between EISA and ISA boards which require slightly different software calls and setup, this driver is meant to show the general approaches to making an EISA or ISA board function on the Silicon Graphics Indigo2 platform. Note that this driver will only operate on IRIX 5.2 or later. There is no software to support writing drivers for EISA or ISA cards under IRIX 4.0.5H (the O/S originally shipped with the Indigo2). The most important routine to pay attention to is the EDTINIT routine. This shows how the address mapping and interrupt allocation for an ISA board is done. This code was taken almost verbatim from Chapter 4 of the IRIX Device Driver Programming Guide (007-0911-030). Note that the macros INB and OUTB were created to replace the inb and outb commands often found in EISA/ISA drivers. For a complete discussion of the issues involved in writing a driver for an EISA or ISA board, GIO, VME or SCSI devices, consult the Device Driver Programming Guide. This document contains a thorough description of all the issues as well as information about many SGI platforms and how to debug device drivers on the Silicon Graphics platforms. The files included in this directory are: Makefile.h550 The Makefile for this driver README This file h550.c The device driver source h550.h The header file h550.o The object file (compiled under IRIX 5.2) h550.sm The system file for this driver - this goes in the /var/sysgen/system directory h550_dev The lines that need to be added to MAKEDEV h550.master The master file for this driver. This file goes in the /var/sysgen/master.d directory as "h550" To install this driver, do the following: Compile the source (only if you have IRIX 5.2) - follow the instructions in Makefile.h550 for this. Copy the h550.o file into /var/sysgen/boot Copy the h550.sm file into /var/sysgen/system Copy the h550.master file into /var/sysgen/master.d as "h550" Modify the file /usr/include/sys/strids.h to create a streams ID for the comtrol module. Choose a number that is not currently used, like 9300. Add the lines in h550_dev to the file /dev/MAKEDEV Run MAKEDEV - "MAKEDEV h550" Reconfigure the kernel - type "autoconfig -f -v" Reboot the system to use the driver
Source
Documentation
Reference